NewsDelay=10000		//Time each story is displayed for
NewsFadeDelay=1000	//Time taken to fade from one story to the next
NewsTextColor=new Array("#CE0000","#CE0000","#CE1111","#CE2222","#CE3333","#CE4444","#CE5555","#CE6666","#CE7777","#CE8888","#CE9999","#CEaaaa","#CEbbbb","#CEcccc","#CEdddd","#eeeeee")
NewsStory=0		//Working Variable
LastNewsStory=0		//Working Variable
NewsColor=0		//Working Variable
dnewsto = null;

NewsArray=new Array(
	'<b>Sabato 22</b>, c\'e\' la festa di primavera al <br/><b>Karma</b>',
		'/activityShow.aspx?activityId=1675',
	'<b>Domenica 23</b>, aperitivo al Foyer e<br/><span class="bodynews">Cabaret</span>',
		'/activityShow.aspx?activityId=1056',
	'<b>Mercoled&iacute 26</b>, aperitivo al <b>Casablanca</b>, ricco buffet, spazio riservato dove conoscersi e parlare.',
		'/activityShow.aspx?activityId=894',
	'<b>Gioved&iacute 27</b>, aperitivo e Live Music al <br/><b>NOWabsolut</b>',
		'/activityShow.aspx?activityId=1538',
	'<b>Venerd&iacute 28</b>, serata in disco all\'<br/><b>Hollywood</b>',
		'/activityShow.aspx?activityId=1434',
	'')

function DisplayNews(){
	LastNewsStory=NewsStory;
	NewsStory++; if( NewsStory>(Math.floor(NewsArray.length/2)) ){NewsStory=1}
	FadeNews();
}


function FadeNews(){
	var NewsLayer=1;

	var NewsText = '<A href="'+ NewsArray[(NewsStory-1)*2+1] +'"><SPAN style="color:'+ NewsTextColor[(NewsTextColor.length)-NewsColor-1] +'">'+ NewsArray[(NewsStory-1)*2] +'</SPAN></A>'
	if(document.layers){ document.eval('newslayer'+NewsLayer).document.write(NewsText); document.eval('newslayer'+NewsLayer).document.close() }//NN4
	if(document.all){ eval('newslayer'+NewsLayer).innerHTML=NewsText }//IE
	if(!document.all && document.getElementById){ document.getElementById('newslayer'+NewsLayer).innerHTML=NewsText; }//NN6
	NewsColor++
	if (NewsColor>=NewsTextColor.length){ NewsColor=0; dnewsto = setTimeout('DisplayNews()',NewsDelay) }
	else { fnewsto = setTimeout('FadeNews()',NewsFadeDelay/NewsTextColor.length) }
}
function StopNews(){
	if (NewsColor==0 && dnewsto!=null){ clearTimeout(dnewsto); dnewsto = setTimeout('DisplayNews()',2*NewsDelay) }
}